/*
* @login.ts
* @deprecated 
* @author czh
* @update (czh 2021/9/29)
*/

import request from '@/utils/request'
//修改密码-登录后
export function updatePwdOn(params) {
    return request({
        url: '/system/user/update/password',
        method: 'post',
        params
    })
}
// 获取验证码
export function getCodeImg() {
    return request({
        url: '/code',
        method: 'get'
    })
}
//登录用户名密码
export function nameLogin(params) {
    return request({
        url: '/auth/oauth/token',
        method: 'get',
        params
    })
}
//登录
export function login(params) {
    return request({
        url: '/auth/oauth/login',
        method: 'post',
        params
    })
}
//登录-手机验证码-发送验证码(登录)
export function loginCode(params) {
    return request({
        url: '/system/user/login/code',
        method: 'get',
        params
    })
}
// 获取数字验证码(注册)
export function getRegCode(params) {
    return request({
        url: '/system/user/verifyCode',
        method: 'get',
        params
    })
}
// 获取数字验证码(忘记密码)
export function getResetCode(params) {
    return request({
        url: '/system/user/password/code',
        method: 'get',
        params
    })
}
//获取用户信息
export function getInfo() {
    return request({
        url: '/system/user/getInfo',
        method: 'get'
    })
}
//登出
export function logout() {
    return request({
        url: '/auth/token/logout',
        method: 'delete',
    })
}
//修改密码
export function updatePassword(params) {
    return request({
        url: '/system/user/update/password',
        method: 'post',
        params
    })
}
//注册
export function registerUser(params) {
    return request({
        url: '/system/user/register',
        method: 'post',
        params
    })
}
//忘记密码
export function updatePwd(data) {
    return request({
        url: '/system/user/password/update',
        method: 'put',
        data: data
    })
}